<?php
/**
 * @version		$Id: index.php 48 2009-12-26 04:39:45Z betweenbrain@gmail.com $
 * @package		Joomla
 * @subpackage	Templates / basic skeleton template
 * @copyright	Copyright (C) 2005 - 2007 Open Source Matters. All rights reserved.
 * @license		GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant to the
 * GNU General Public License, and as distributed it includes or is derivative
 * of works licensed under the GNU General Public License or other free or open
 * source software licenses. See COPYRIGHT.php for copyright notices and
 * details.
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

include_once("includes/template_config.php");
$url = clone(JURI::getInstance());
$user =& JFactory::getUser();
if (getPageIndexFile() !=''):
	include_once getPageIndexFile();
;else:
?>
<?php echo '<?xml version="1.0" encoding="utf-8"?' .'>'; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >

<head>
	<jdoc:include type="head" />
	<meta name="mssmarttagspreventparsing" content="true" />
	<meta http-equiv="imagetoolbar" content="no" />
	<link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/<?php echo $this->params->get('widthStyle'); ?>.css" rel="stylesheet" type="text/css" media="screen" />
	<link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css" rel="stylesheet" type="text/css" media="screen" />	
	<link rel="alternate stylesheet" type="text/css" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/narrow.css" title="narrow" media="screen" />
	<link rel="alternate stylesheet" type="text/css" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/wide.css" title="wide" media="screen" />
	<link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/javascript/magiczoomplus.css" rel="stylesheet" type="text/css" media="screen" />	
	<script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/javascript/magic-zoom.js"></script>
	<?php if ($this->params->get('styleSwitch') == 1): ?>
   		<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/javascript/styleswitch.js"></script>
	<?php endif; ?>
	<!--[if lt IE 7]>
	<style type="text/css"> img { behavior: url(<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/iepngfix.htc); }</style>
	<link rel="stylesheet" type="text/css" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/ie_hacks.css" media="screen, projection" />
	<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/javascript/iehover.js"></script>
	<![endif]-->	
	<!--[if IE 7]>
		<link rel="stylesheet" type="text/css" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/ie_7.css" media="screen, projection" />
	<![endif]-->
	<?php if($this->direction == 'rtl') : ?><link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/rtl/layout_rtl.css" rel="stylesheet" type="text/css" /><?php endif; ?>
	<script type="text/javascript">
    	window.onDomReady(function(){ new SmoothScroll({duration: 1200}); });
	</script>
	<?php echo getPageCssFile() ;?>
</head>

<body id="<?php echo $style ;?>" class="joomla">
    <div id="container'>
		<a id="top" name="top"></a>
    		
        <ul id="access">
			<li><a href="<?php $url->setFragment('content'); echo $url->toString();?>" class="to-content">Content</a></li>
			
			<?php if ($this->countModules('user3')) : ?>
			<li><a href="<?php $url->setFragment('mainmenu'); echo $url->toString();?>" class="to-nav">Navigation</a></li>
			<?php endif; ?>
			
			<?php if($this->countModules('user6 or user7 or user8 or user9')) : ?>
			<li><a href="<?php $url->setFragment('additional'); echo $url->toString();?>" class="to-additional">Additional Information</a></li>
			<?php endif; ?>
			
			<?php if ($this->params->get('styleSwitch') == 1): ?>
            <li class="narrow"><a href="#" onclick="setActiveStyleSheet('narrow'); return false;" title="Narrow">narrow</a></li>
            <li class="wide"><a href="#" onclick="setActiveStyleSheet('wide'); return false;" title="Wide">wide</a></li>
			<?php endif; ?>

		
		</ul>
    
        <div id="header" class="clr clearfix">
        
            <div id="branding">
            	<?php if ($user->get('guest')) : ?>
                	<h1><a href="<?php echo $this->baseurl ?>/index.php" title="<?php echo $mainframe->getCfg('sitename');?>"><?php echo $mainframe->getCfg('sitename');?></a></h1>
            	<?php else : ?>
                <p>
                	Hello <?php echo $user->get('name');?><br />
                	Your email address is: <?php echo $user->get('email');?> click <a href="<?php echo $this->baseurl ?>/index.php?option=com_user&amp;view=user&amp;task=edit#email" title="User details page">here</a> to change it<br />
                	You are a: <?php echo $user->get('usertype');?> user<br />
                	You registered on: <?php echo $user->get('registerDate');?><br />
                	You last visited the site on: <?php echo $user->get('lastvisitDate');?>
                </p>
            	<?php endif; ?>
            </div><!-- end branding -->
            
            <?php if ($this->countModules('top')) : ?>
            <div id="top-module">
            	<jdoc:include type="modules" name="top" style="xhtml" />
            </div><!-- end top-module -->
            <?php endif; ?>
            
        </div><!-- end header -->
            
        <div id="breadcrumbs">
        	<p>You are here: <jdoc:include type="module" name="breadcrumbs" /></p>
        </div><!-- end breadcrumbs -->
            
        <?php if ($this->countModules('user3')) : ?>
        <a id="mainmenu" name="mainmenu"></a>
        <div id="nav" class="clr">
            <jdoc:include type="modules" name="user3" style="raw" /> 
        </div><!-- end nav -->
        <?php endif; ?>
        
        <div id="BodyContent" class="clr clearfix">
			<div id="LoadFirst" class="clearfix">
				
				<div id="MiddleCol">
					<div class="inside">
						<?php if ($this->countModules('user1 or user2 or user4 or user5')) : ?>
            			<div id="top-user-modules" class="clearfix">
            		
            				<?php if ($this->countModules('user1')) : ?>
            				<div id="user1" class="count<?php echo $top_total ;?>">
								<div class="inside">
                					<jdoc:include type="modules" name="user1" style="xhtml" />
            					</div><!-- end inside -->
            				</div><!-- end user1 -->
            				<?php endif; ?>
            		
            				<?php if ($this->countModules('user2')) : ?>
            				<div id="user2" class="count<?php echo $top_total ;?>">
								<div class="inside">
                					<jdoc:include type="modules" name="user2" style="xhtml" />
            					</div><!-- end inside -->
            				</div><!-- end user2 -->
            				<?php endif; ?>
            		
            				<?php if ($this->countModules('user4')) : ?>
            				<div id="user4" class="count<?php echo $top_total ;?>">
								<div class="inside">
                					<jdoc:include type="modules" name="user4" style="xhtml" />
            					</div><!-- end inside -->
            				</div><!-- end user4 -->
            				<?php endif; ?>
            		
            				<?php if ($this->countModules('user5')) : ?>
            				<div id="user5" class="count<?php echo $top_total ;?>">
								<div class="inside">
                					<jdoc:include type="modules" name="user5" style="xhtml" />
            					</div><!-- end inside -->
            				</div><!-- end user5 -->
            				<?php endif; ?>
            		
            			</div><!-- end top-user-modules -->
            			<?php endif; ?>
            	
						<a id="content" name="content"></a>
            			<div id="mainbody">
            				<?php if ($this->getBuffer('message')) : ?>
							<div class="error">
								<h2> Message </h2>
									<jdoc:include type="message" />
							</div>
							<?php endif; ?>
								<p><a href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/javascript/hdred-big.jpg" title="Harley Davidson" class="MagicZoom MagicThumb"><img src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/javascript/hdred-small.jpg" width="300" height="158" alt=""/></a>
								<img class="MagicZoomLoading" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/javascript/ajax-loader.gif" width="16" height="16" alt="Loading zoom..."/></p>
							
                			<jdoc:include type="component" />
            			</div><!-- end mainbody -->
            	
            			<?php if ($this->countModules('user6 or user7 or user8 or user9')) : ?>
						<a id="additional" name="additional"></a>
            			<div id="bottom-user-modules" class="clearfix">
            		
            				<?php if ($this->countModules('user6')) : ?>
            				<div id="user6" class="count<?php echo $bottom_total ;?>">
								<div class="inside">
                					<jdoc:include type="modules" name="user6" style="xhtml" />
            					</div><!-- end inside -->
            				</div><!-- end user6 -->
            				<?php endif; ?>
            		
            				<?php if ($this->countModules('user7')) : ?>
            				<div id="user7" class="count<?php echo $bottom_total ;?>">
								<div class="inside">
                					<jdoc:include type="modules" name="user7" style="xhtml" />
            					</div><!-- end inside -->
            				</div><!-- end user7 -->
            				<?php endif; ?>
            		
            				<?php if ($this->countModules('user8')) : ?>
            				<div id="user8" class="count<?php echo $bottom_total ;?>">
								<div class="inside">
                					<jdoc:include type="modules" name="user8" style="xhtml" />
            					</div><!-- end inside -->
            				</div><!-- end user8 -->
            				<?php endif; ?>
            		
            				<?php if ($this->countModules('user9')) : ?>
            				<div id="user9" class="count<?php echo $bottom_total ;?>">
								<div class="inside">
                					<jdoc:include type="modules" name="user9" style="xhtml" />
            					</div><!-- end inside -->
            				</div><!-- end user9 -->
            				<?php endif; ?>
            		
            			</div><!-- end bottom-user-modules -->
            			<?php endif; ?>
            		</div><!-- end inside -->
				</div><!-- end MiddleCol -->
	
				<?php if ($this->countModules('left or syndicate')) : ?>
				<div id="left">
					<div class="inside">
						<?php if ($this->countModules('left')) : ?>
							<jdoc:include type="modules" name="left" style="xhtml" />
            			<?php endif; ?>
						<?php if ($this->countModules('syndicate')) : ?>
							<jdoc:include type="modules" name="syndicate" style="xhtml" />
            			<?php endif; ?>
            		</div><!-- end inside -->
				</div><!-- end leftCol -->
            	<?php endif; ?>
				
			</div><!-- end LoadFirst -->
					
	
			<?php if($this->countModules('right') and JRequest::getCmd('layout') != 'form') : ?>
			<div id="right">
				<div class="inside">
					<jdoc:include type="modules" name="right" style="xhtml" />
            	</div><!-- end inside -->
			</div><!-- end RightCol -->
            <?php endif; ?>

		</div><!-- end BodyContent -->
        
        
        <div id="footer" class="clearfix">
        	<?php if ($this->countModules('footer')) : ?>
			<div class="inside">
            	<jdoc:include type="modules" name="footer" style="xhtml" />
            </div><!-- end inside -->
            <?php endif; ?>
        </div><!-- end footer -->

		<!-- Back to top link -->
		<div id="backtotoplink">
			<a href="<?php $url->setFragment('top'); echo $url->toString();?>" class="to-additional">Back to Top</a>
		</div>
        
    </div><!-- end page -->
    
    <?php if ($this->countModules('debug')) : ?>
    <div id="debug"><jdoc:include type="modules" name="debug" /></div>
    <?php endif; ?>
    
</body>
</html>
<?php endif; ?>